On a conventional computer network, each switch is capable of acquiring only information about an adjacent switch, and a global network view is not available for each switch. A network based on a software defined network (SDN) technology is an important trend of future network development. A core idea of an SDN is separating a control plane of a network device from a data forwarding plane of the network device. A switch performs forwarding strictly based on a forwarding table; the switch provides an interface (e.g., an application programming interface (API)) for a controller to control; and the switch and the controller follow a certain protocol.
On an SDN network, a routing table is empty during initialization of a switch. When no matched routing table is found in the switch for a received data packet, the received data packet is reported to a controller to request a forwarding policy. For the data packet reported by the switch, the controller selects a route for the switch and delivers a corresponding routing table to the switch if a destination address is found in a local media access control (MAC) table of physical addresses of devices. If no destination address of the reported data packet is found in the local MAC table, the controller instructs the switch to flood the data packet to ports of all other switches except for a receiving port on a local network. However, the data packet may be repeatedly broadcast on the network, causing a broadcast storm.